﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Imaginecup.shareData
{
    public class GraphicShareData
    {
        private static GraphicShareData m_ShareData = null;

        private SpriteBatch m_SpriteBatch;
        private BasicEffect m_BasicEffect;
        private GraphicsDevice m_GraphicDevice;
        private GraphicsDeviceManager m_GraphicDeviceManager;

        private GraphicShareData() { }

        public static GraphicShareData GetShareData()
        {
            if( m_ShareData == null )
            {
                m_ShareData = new GraphicShareData();
            }

            return m_ShareData;
        }

        public SpriteBatch GetSpriteBatch()
        {
            return m_SpriteBatch;
        }

        public void SetSpriteBatch( SpriteBatch spriteBatch )
        {
            m_SpriteBatch = spriteBatch;
        }

        public BasicEffect GetBasicEffect()
        {
            return m_BasicEffect;
        }

        public void SetBasicEffect(BasicEffect effect)
        {
            m_BasicEffect = effect;
        }

        public GraphicsDevice GetGraphicDevice()
        {
            return m_GraphicDevice;
        }

        public void SetGraphicDevice(GraphicsDevice device)
        {
            m_GraphicDevice = device;
        }

        public void SetGraphicDeviceMan(Microsoft.Xna.Framework.GraphicsDeviceManager graphicsDeviceManager)
        {
            m_GraphicDeviceManager = graphicsDeviceManager;
        }

        public GraphicsDeviceManager GetGraphicDeviceMan()
        {
            return m_GraphicDeviceManager;
        }
    }
}
